#ifndef SAMPLEUPLOADER_H
#define SAMPLEUPLOADER_H

#include "AbstractUploader.h"
#include "UploadWorker.h"

class SampleUploader : public UploadWorker
{
Q_OBJECT
public:
	SampleUploader(QObject *parent, QNetworkAccessManager *netMgr, const HostingParams &Hosting)
		: UploadWorker(parent, netMgr), hosting(Hosting) { };

signals:
private:
	bool collectPostData();
	bool appendImageToPost(const ImageToUpload &image);
	bool setHeaders(QNetworkRequest &req);
	const QUrl hostingUrl() const { return hosting.URL; }
	QList<UploadResult> parseResponse() const;
	UploadResult parseResponseSingle(const QString &table) const; // every separate html table
	bool checkLinks(UploadResult &links) const;
	bool tryFind(const QString &line, const QString &findItem, UploadResult &links) const;
	QString tryFind(const QString &line, const QRegExp &pattern) const;
	const HostingParams hosting;
public slots:

};


#endif // SAMPLEUPLOADER_H
